<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/purchasenotefolder/PurchaseNote.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/system/purchasenotefolder/PurchaseNote.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'PurchaseId',
            footer: "Foots",
            cnName: '采购',
            name: 'purchasenotefolder/PurchaseNote',
            url: "/PurchaseNote/",
            sortName: "PurchaseId"
        });
        const editFormFields = ref({ "PurchaseId": "", "DocumentType": "", "SupplierCode": "", "SupplierName": "", "SupplierPhone": "", "ReceiptDate": "", "Remark": "", "DocumentMaker": "", "MakeOrderTime": "" });
        const editFormOptions = ref([[{ "title": "采购编号", "required": true, "field": "PurchaseId", "disabled": true },
        { "title": "单据类型", "field": "DocumentType", "type": "number" }],
        [{ "title": "供应商编号", "field": "SupplierCode" },
        { "title": "供应商联系人", "field": "SupplierName" }],
        [{ "title": "供应商电话", "field": "SupplierPhone" },
        { "title": "收货日期", "field": "ReceiptDate", "type": "datetime" }],
        [{ "title": "备注", "field": "Remark" },
        { "title": "制单人", "field": "DocumentMaker" }],
        [{ "title": "制单日期", "field": "MakeOrderTime", "type": "datetime" }]]);
        const searchFormFields = ref({ "PurchaseId": "" });
        const searchFormOptions = ref([[{ "title": "采购编号", "field": "PurchaseId", "type": "like" }]]);
        const columns = ref([{ field: 'PurchaseId', title: '采购编号', type: 'string', width: 220, readonly: true, require: true, align: 'left', sort: true },
        { field: 'DocumentType', title: '单据类型', type: 'int', width: 110, align: 'left' },
        { field: 'SupplierCode', title: '供应商编号', type: 'string', width: 240, align: 'left' },
        { field: 'SupplierName', title: '供应商联系人', type: 'string', width: 110, align: 'left' },
        { field: 'SupplierPhone', title: '供应商电话', type: 'string', width: 110, align: 'left' },
        { field: 'ReceiptDate', title: '收货日期', type: 'date', width: 150, align: 'left', sort: true },
        { field: 'Remark', title: '备注', type: 'string', width: 180, align: 'left' },
        { field: 'DocumentMaker', title: '制单人', type: 'string', width: 110, align: 'left' },
        { field: 'MakeOrderTime', title: '制单日期', type: 'date', width: 150, align: 'left', sort: true },
        { field: 'OrderStatus', title: '采购状态', type: 'int', width: 110, align: 'left' },
        { field: 'IsEntry', title: '是否入账', type: 'sbyte', width: 110, align: 'left' },
        { field: 'IsSendBack', title: '是否退回', type: 'sbyte', width: 110, align: 'left' },
        { field: 'CreateTime', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'IsDeleted', title: '是否删除', type: 'sbyte', width: 110, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
